<name>Greate Pier</name>
<profession>Trainer</profession>
<faction>Serenity</faction>
<sellsat>10</sellsat>
<dialogue>
  <greeting>
    <reply>
      <text>Goo'nday, trainees! Spend your energies on those who make you strong.
Say, you don't have any pipe tobacco for me, by chance?</text>
      <return>main</return>
    </reply>
  </greeting>
  <main>
    <option>
      <if><level>training</level></if>
      <text>I wish to train to the next level.</text>
      <npc>
        <reply>
          <if><hour>!9</hour></if>
          <text>The gym opens at nine, [gender].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><hour>17</hour></if>
          <text>I can't allow any entries after five in the afternoon, [gender].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if>
            <class>!Explorer</class>
            <class>!Student</class>
          </if>
          <text>Only explorers and students receive training here, [class].</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><level>10</level></if>
          <text>I am sorry, with these simple facilities I cannot train you beyond level 10.</text>
          <return>main</return> 
        </reply>
        <reply>
          <if><gold>!training</gold></if>
          <text>Alas, you cannot afford the fee.</text>
          <return>main</return> 
        </reply>
        <reply>
          <text>Excellent! Follow me, [name], if you please.</text>
          <script>
            <gold>training</gold>
            <level>1</level>
            <hours>2</hours>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>What are the benefits of training?</text>
      <npc>
        <reply>
          <text>By training to a higher level, you increase your health and mana. In addition, you will be able to improve your various skills. And any racial ability you possess will increase in strength. So, do not depend only on theory if your life is at stake! And never trust to hope. Hope is black and forsaken.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>How high can we train?</text>
      <npc>
        <reply>
          <text>This is a simple gym, for explorers and students only, and no higher than level 10. In Soronne, at the Towers of Learning, you can get beyond that.</text>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <if>
        <key>chestsbooked</key>
        <item>Pier's Tobacco</item>
      </if>
      <text>We have found your pipe tobacco that was lost in the storm.</text>
      <npc>
        <reply>
          <text>Ah, the finest halfling weeds! I was about to place a new order. If you found any change, keep it!</text>
          <script>
            <give>Pier's Tobacco</give>
            <expall>500</expall>
            <reputation>1</reputation>
            <key>tobaccodelivered</key>
            <quest>Lost Chests|Delivered the pipe tobacco</quest>
            <log>Delivered Greate Pier's pipe tobacco</log>
          </script>
          <return>main</return> 
        </reply>
      </npc>
    </option>
    <option>
      <text>Goodbye!</text>
      <npc>
        <reply>
          <return>exit</return> 
        </reply>
      </npc>
    </option>
  </main> 
</dialogue>